﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WebShopDAL
{
    public class User
    {
        public int UserId { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Personnumber { get; set; }
        public string Adress { get; set; }
        public string Zip { get; set; }
        public string City { get; set; }
        public string Email { get; set; }
        public string Phone { get; set; }

        public User(string username, string password, string firstname, string lastname, string personnumber, string adress, string zip, string city, string email, string phone, int userId = 0)
        {
            Username = username;
            Password = password;
            FirstName = firstname;
            LastName = lastname;
            Personnumber = personnumber;
            Adress = adress;
            Zip = zip;
            City = city;
            Email = email;
            Phone = phone;
            UserId = userId;
        }

        public User(string username, string password, string firstname, string lastname, string personnumber, string adress, string zip, string city, string email, string phone)
        {
            Username = username;
            Password = password;
            FirstName = firstname;
            LastName = lastname;
            Personnumber = personnumber;
            Adress = adress;
            Zip = zip;
            City = city;
            Email = email;
            Phone = phone;
        }
        public User(string username, string firstname, string lastname, string personnumber, string adress, string zip, string city, string email, string phone, int userId)
        {
            Username = username;
            FirstName = firstname;
            LastName = lastname;
            Personnumber = personnumber;
            Adress = adress;
            Zip = zip;
            City = city;
            Email = email;
            Phone = phone;
            UserId = userId;
        }

        public override string ToString()
        {
            return string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}", Username, Password, FirstName, LastName, Personnumber, Adress, Zip, City, Email, Phone);
        }
    }
}
